<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
    <script type="text/javascript">
        //用户名必须为6-15位的数字字母下划线
       // var reg_username = /^\w{6,15}$/;
       //  var nameuser = "123456p_";
       //  alert(reg_username.test(nameuser));
        //密码必须为6-15位的数字字母下划线，不能以数字开头
        // var reg_password = /^[a-zA-Z_]\w{5,14}$/;
        // var password = "fs_dkaAd_";
        // alert(reg_password.test(password));
        //验证性别只能为男或女
        // var reg_yanzma =/^[男女]$/;
        // var yanz = "女";
        // alert(reg_yanzma.test(yanz));
        //验证年龄为18-99岁之间
        // var reg_age = /^([2-9][0-9]|1[8,9])$/;
        // var age = "56";
        // alert(reg_age.test(age));
        //验证正确的手机号
        // var reg_tel = /^1[0-9]{10}$/;
        // var tel = "13840557729";
        // alert(reg_tel.test(tel));

        //验证正确的身份证号码
        // var reg_shen =/^[1-9]\d{16}[0-9X]$/;
        // var shen = "210114199803096012";
        // alert(reg_shen.test(shen));


        //验证正确的邮箱地址
        var reg_email = /^[a-zA-Z0-9]\w+@\w+\.(com|cn|com\.cn)$/;
        var email = "135838154@qq.com";
        alert(reg_email.test(email));

    </script>
</head>
<body>

</body>
</html>